<?php /* Smarty version 2.6.22, created on 2012-04-17 16:42:24
         compiled from login.tpl.html */ ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "headerLogin.tpl.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>

<div id="divContent" class="widthContent2 radiusDiv shadowDiv backWhite textAlignLeft tableDiv" style="height:auto; margin-top:50px;">
	<div class="cellTableDiv leftDivFloat widthContent2 leftTopRadiusDiv rightTopRadiusDiv darkBlueEffect" style="text-align:center;">
		<p class="pCellDivHead">Login</p>
	</div>	 
	<div class=" cellTableDiv leftDivFloat widthContent2 lightGreyDiv3" style="height: 200px; text-align:center;">
		
		
		<table class="widthContent2" style="">
			<tr>
				<td colspan="2">&nbsp;</td>
			</tr>
			<tr>
				<td colspan="2">&nbsp;</td>
			</tr>
			<tr>
				<td width="40%" style="padding-left:30px;">Username</td>
				<td align="left"><input type="text" id="user" name="user" class="inputGeneric200" value="<?php echo $this->_tpl_vars['user']; ?>
" /></td>
			</tr>
			<tr>
				<td style="padding-left:30px;">Password</td>
				<td align="left"><input type="password" name="password" class="inputGeneric200" value="" /></td>
			</tr>
			<tr>
				<td colspan="2">&nbsp;</td>
			</tr>
			<tr>
				<td colspan="2">&nbsp;</td>
			</tr>
			<tr valign="middle" style="">
				<td colspan="2" align="center">&nbsp;<?php echo $this->_tpl_vars['error']; ?>
</td>
			</tr>
			<tr>
				<td colspan="2">&nbsp;</td>
			</tr>
			<!--<tr>
				<td colspan="2" align="center">Se vuoi registrarti premi <b><a href="#" onclick="editItem()">QUI</a></b></td>
			</tr>-->
			<tr>
				<td  colspan="2" style="">
					<input type="button" class="buttonNew2 shadowButton effectImage radiusButton" onClick="_submit()" value="Login" />
				</td>
			</tr>
		</table>
	
	</div>
	<div class="cellTableDiv leftDivFloat widthContent2 leftBottomRadiusDiv rightBottomRadiusDiv darkBlueEffect" style="height: 10px;text-align:center;">
	</div>	
</div>

<input type="hidden" name="recupero" id="recupero" value="<?php echo $this->_tpl_vars['recupero']; ?>
" />
<input type="hidden" name="azienda" value="<?php echo $this->_tpl_vars['azienda']; ?>
" />
<input type="hidden" name="save" value="<?php echo $this->_tpl_vars['save']; ?>
" />

<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "funcPopup.js", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>

<script type="text/javascript">
	<?php if ($this->_tpl_vars['returnPath'] != '' && $this->_tpl_vars['endSession'] == 'S'): ?>
		document.location.href = '<?php echo $this->_tpl_vars['returnPath']; ?>
';
	<?php endif; ?>
	setFocus();
	var azienda = '<?php echo $this->_tpl_vars['azienda']; ?>
';
	var parentDoc = '<?php echo $this->_tpl_vars['parent']; ?>
';
	
<?php echo '
	if ( document.getElementById("recupero").value == \'S\')	
	{
		document.getElementById("divRecupero").style.display = "block";
		document.getElementById("divLogin").style.display = "none";
	}

	function _submitRec()
	{
		if ( document.getElementById("user2").value != "")
		{	
			document.main.recupero.value = "S";
			document.main.submit();
		}
		else
		{
			alert("Username mancante")
		}
	}

	function _submitRegister()
	{
// 		document.main.save.value = "R";
// 		document.main.submit();
				document.location.href = "Main.php?mod=utente&do=register";
	}

	function _submitLog()
	{
		document.location.href = "Main.php?"
	}

	
	function recuperaPass()
	{
		document.getElementById("divRecupero").style.display = "block";
		document.getElementById("divLogin").style.display = "none";
		document.main.user2.focus();
	}
	
	function editUser( tipo )
	{
		if ( tipo == "utente" )
		{
			document.getElementById("user").value = "";
			document.getElementById("user").readOnly = false;
			setFocus();
		}
		else
		{
			document.getElementById("user").value = "admin";
			document.getElementById("user").readOnly = true;
		}
		document.getElementById("password").value = "";
	}
	
	function _submit()
	{
		//if ( parentDoc != \'\' )
		//	parent.callApp( document.main.user.value, document.main.pass.value );
		//else
		//alert (\'ok\');
			document.main.submit();
	}
	
	function responseKeyPress(key)
	{
		if ( key == "ENTER" ) _submit();
	}

    function setFocus() 
    {
        document.main.user.focus();
    }

    function setUser( usr ) 
    {
        document.getElementById("user").value = usr;
    }
	
	function editItem()
	{
		popupOpenId(\'registra\',\'registra\', \'&azienda=\'+azienda);
	}
'; ?>

</script>

<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "sysMsg.js", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "sysError.tpl.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "usrError.tpl.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "usrInfo.tpl.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "footerLogin.tpl.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?> 